package com.event.common.util;

import java.io.Serializable;
import java.util.List;

/**
 * @Description 线程事件上下文
 * @Author Bing
 * @Date 2024/10/30 11:32
 */
public class ThreadEventContext {

    private static final ThreadLocal<List<Serializable>> THREAD_LOCAL = new ThreadLocal<>();

    public static List<Serializable> get() {
        return THREAD_LOCAL.get();
    }

    public static void remove() {
        THREAD_LOCAL.remove();
    }

    public static void set(List<Serializable> list) {
        THREAD_LOCAL.set(list);
    }
}